"use strict";
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
    return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (g && (g = 0, op[0] && (_ = 0)), _) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
        if (ar || !(i in from)) {
            if (!ar) ar = Array.prototype.slice.call(from, 0, i);
            ar[i] = from[i];
        }
    }
    return to.concat(ar || Array.prototype.slice.call(from));
};
Object.defineProperty(exports, "__esModule", { value: true });
var vue_1 = require("vue");
var element_plus_1 = require("element-plus");
var vue_router_1 = require("vue-router");
var router = (0, vue_router_1.useRouter)();
var categoryList = (0, vue_1.ref)([
    {
        id: '1',
        index: 1,
        name: '21世纪',
        brand: '品牌A',
        isHidden: false
    }
]);
var form = (0, vue_1.reactive)({
    id: '',
    name: '',
    brand: '品牌A',
    isHidden: false
});
var formRules = {
    name: [
        { required: true, message: '请输入分类名称', trigger: 'blur' },
        { min: 1, max: 50, message: '分类名称长度在 1 到 50 个字符', trigger: 'blur' }
    ],
    brand: [
        { required: true, message: '请选择归属品牌', trigger: 'change' }
    ]
};
var dialogVisible = (0, vue_1.ref)(false);
var isEdit = (0, vue_1.ref)(false);
var formRef = (0, vue_1.ref)(null);
var currentPage = (0, vue_1.ref)(1);
var pageSize = (0, vue_1.ref)(10);
var jumpPage = (0, vue_1.ref)('');
var totalPages = (0, vue_1.computed)(function () {
    return Math.ceil(categoryList.value.length / pageSize.value) || 1;
});
var openAddDialog = function () {
    isEdit.value = false;
    Object.assign(form, {
        id: '',
        name: '',
        brand: '品牌A',
        isHidden: false
    });
    (0, vue_1.nextTick)(function () {
        if (formRef.value) {
            formRef.value.resetFields();
        }
    });
    dialogVisible.value = true;
};
var openEditDialog = function (row) {
    isEdit.value = true;
    Object.assign(form, JSON.parse(JSON.stringify(row)));
    (0, vue_1.nextTick)(function () {
        if (formRef.value) {
            formRef.value.clearValidate();
        }
    });
    dialogVisible.value = true;
};
var submitForm = function () { return __awaiter(void 0, void 0, void 0, function () {
    var index, newIndex, newCategory, error_1;
    return __generator(this, function (_a) {
        switch (_a.label) {
            case 0:
                _a.trys.push([0, 2, , 3]);
                return [4 /*yield*/, formRef.value.validate()];
            case 1:
                _a.sent();
                if (isEdit.value) {
                    index = categoryList.value.findIndex(function (item) { return item.id === form.id; });
                    if (index !== -1) {
                        categoryList.value.splice(index, 1, __assign({}, form));
                        element_plus_1.ElMessage.success('编辑成功');
                    }
                }
                else {
                    newIndex = categoryList.value.length + 1;
                    newCategory = __assign(__assign({}, form), { id: Date.now().toString(), index: newIndex });
                    categoryList.value.unshift(newCategory);
                    element_plus_1.ElMessage.success('新增成功');
                }
                dialogVisible.value = false;
                return [3 /*break*/, 3];
            case 2:
                error_1 = _a.sent();
                if (error_1.name !== 'ValidationError') {
                    element_plus_1.ElMessage.error('操作失败，请重试');
                    console.error(error_1);
                }
                return [3 /*break*/, 3];
            case 3: return [2 /*return*/];
        }
    });
}); };
var handleHiddenChange = function (row) { return __awaiter(void 0, void 0, void 0, function () {
    var error_2;
    return __generator(this, function (_a) {
        switch (_a.label) {
            case 0:
                _a.trys.push([0, 2, , 3]);
                return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 300); })];
            case 1:
                _a.sent();
                element_plus_1.ElMessage.success("\u662F\u5426\u9690\u85CF\u72B6\u6001\u5DF2\u66F4\u65B0\u4E3A".concat(row.isHidden ? 'ON' : 'OFF'));
                return [3 /*break*/, 3];
            case 2:
                error_2 = _a.sent();
                row.isHidden = !row.isHidden;
                element_plus_1.ElMessage.error('状态更新失败');
                console.error(error_2);
                return [3 /*break*/, 3];
            case 3: return [2 /*return*/];
        }
    });
}); };
var handleDelete = function (row) { return __awaiter(void 0, void 0, void 0, function () {
    var index, error_3;
    return __generator(this, function (_a) {
        switch (_a.label) {
            case 0:
                _a.trys.push([0, 2, , 3]);
                return [4 /*yield*/, element_plus_1.ElMessageBox.confirm('确定删除该产品分类吗？', '提示', {
                        confirmButtonText: '确定',
                        cancelButtonText: '取消',
                        type: 'warning'
                    })];
            case 1:
                _a.sent();
                index = categoryList.value.findIndex(function (item) { return item.id === row.id; });
                if (index !== -1) {
                    categoryList.value.splice(index, 1);
                    categoryList.value.forEach(function (item, i) {
                        item.index = i + 1;
                    });
                    element_plus_1.ElMessage.success('删除成功');
                }
                return [3 /*break*/, 3];
            case 2:
                error_3 = _a.sent();
                if (error_3 !== 'cancel') {
                    element_plus_1.ElMessage.error('删除失败');
                    console.error(error_3);
                }
                return [3 /*break*/, 3];
            case 3: return [2 /*return*/];
        }
    });
}); };
var handleCurrentChange = function (val) {
    currentPage.value = val;
    jumpPage.value = val;
};
var handleSizeChange = function (val) {
    pageSize.value = val;
    currentPage.value = 1;
    jumpPage.value = 1;
};
var handleJump = function () {
    if (!jumpPage.value)
        return;
    var page = Number(jumpPage.value);
    if (isNaN(page) || page < 1) {
        page = 1;
    }
    else if (page > totalPages.value) {
        page = totalPages.value;
    }
    currentPage.value = page;
    jumpPage.value = page;
};
var handleReturn = function () {
    router.back();
};
(0, vue_1.watch)(totalPages, function (newVal) {
    if (currentPage.value > newVal && newVal > 0) {
        currentPage.value = newVal;
        jumpPage.value = newVal;
    }
});
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
var __VLS_ctx = __assign(__assign({}, {}), {});
var __VLS_elements;
var __VLS_components;
var __VLS_directives;
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)(__assign({ class: "product-category-page" }));
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)(__assign({ class: "page-header" }));
__VLS_asFunctionalElement(__VLS_elements.h2, __VLS_elements.h2)(__assign({ class: "page-title" }));
var __VLS_0 = {}.ElButton;
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
// @ts-ignore
ElButton;
// @ts-ignore
var __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0(__assign(__assign({ 'onClick': {} }, { type: "text" }), { class: "return-btn" })));
var __VLS_2 = __VLS_1.apply(void 0, __spreadArray([__assign(__assign({ 'onClick': {} }, { type: "text" }), { class: "return-btn" })], __VLS_functionalComponentArgsRest(__VLS_1), false));
var __VLS_4;
var __VLS_5;
var __VLS_6 = ({ click: {} },
    { onClick: (__VLS_ctx.handleReturn) });
var __VLS_7 = __VLS_3.slots.default;
// @ts-ignore
[handleReturn,];
var __VLS_3;
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)(__assign({ class: "action-area" }));
var __VLS_8 = {}.ElButton;
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
// @ts-ignore
ElButton;
// @ts-ignore
var __VLS_9 = __VLS_asFunctionalComponent(__VLS_8, new __VLS_8(__assign(__assign(__assign({ 'onClick': {} }, { type: "primary" }), { class: "add-btn" }), { style: {} })));
var __VLS_10 = __VLS_9.apply(void 0, __spreadArray([__assign(__assign(__assign({ 'onClick': {} }, { type: "primary" }), { class: "add-btn" }), { style: {} })], __VLS_functionalComponentArgsRest(__VLS_9), false));
var __VLS_12;
var __VLS_13;
var __VLS_14 = ({ click: {} },
    { onClick: (__VLS_ctx.openAddDialog) });
var __VLS_15 = __VLS_11.slots.default;
// @ts-ignore
[openAddDialog,];
var __VLS_11;
var __VLS_16 = {}.ElTable;
/** @type {[typeof __VLS_components.ElTable, typeof __VLS_components.elTable, typeof __VLS_components.ElTable, typeof __VLS_components.elTable, ]} */ ;
// @ts-ignore
ElTable;
// @ts-ignore
var __VLS_17 = __VLS_asFunctionalComponent(__VLS_16, new __VLS_16(__assign(__assign({ data: (__VLS_ctx.categoryList), border: true }, { style: {} }), { rowKey: (function (row) { return row.id; }) })));
var __VLS_18 = __VLS_17.apply(void 0, __spreadArray([__assign(__assign({ data: (__VLS_ctx.categoryList), border: true }, { style: {} }), { rowKey: (function (row) { return row.id; }) })], __VLS_functionalComponentArgsRest(__VLS_17), false));
var __VLS_20 = __VLS_19.slots.default;
// @ts-ignore
[categoryList,];
var __VLS_21 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
ElTableColumn;
// @ts-ignore
var __VLS_22 = __VLS_asFunctionalComponent(__VLS_21, new __VLS_21({
    prop: "index",
    label: "序号",
    sortable: true,
    width: "80",
}));
var __VLS_23 = __VLS_22.apply(void 0, __spreadArray([{
        prop: "index",
        label: "序号",
        sortable: true,
        width: "80",
    }], __VLS_functionalComponentArgsRest(__VLS_22), false));
var __VLS_26 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
ElTableColumn;
// @ts-ignore
var __VLS_27 = __VLS_asFunctionalComponent(__VLS_26, new __VLS_26({
    prop: "name",
    label: "分类名称",
    sortable: true,
}));
var __VLS_28 = __VLS_27.apply(void 0, __spreadArray([{
        prop: "name",
        label: "分类名称",
        sortable: true,
    }], __VLS_functionalComponentArgsRest(__VLS_27), false));
var __VLS_31 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
ElTableColumn;
// @ts-ignore
var __VLS_32 = __VLS_asFunctionalComponent(__VLS_31, new __VLS_31({
    prop: "brand",
    label: "归属品牌",
    sortable: true,
}));
var __VLS_33 = __VLS_32.apply(void 0, __spreadArray([{
        prop: "brand",
        label: "归属品牌",
        sortable: true,
    }], __VLS_functionalComponentArgsRest(__VLS_32), false));
var __VLS_36 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
ElTableColumn;
// @ts-ignore
var __VLS_37 = __VLS_asFunctionalComponent(__VLS_36, new __VLS_36({
    label: "是否隐藏",
    width: "120",
}));
var __VLS_38 = __VLS_37.apply(void 0, __spreadArray([{
        label: "是否隐藏",
        width: "120",
    }], __VLS_functionalComponentArgsRest(__VLS_37), false));
var __VLS_40 = __VLS_39.slots.default;
{
    var __VLS_41 = __VLS_39.slots.default;
    var scope_1 = __VLS_getSlotParameters(__VLS_41)[0];
    var __VLS_42 = {}.ElSwitch;
    /** @type {[typeof __VLS_components.ElSwitch, typeof __VLS_components.elSwitch, ]} */ ;
    // @ts-ignore
    ElSwitch;
    // @ts-ignore
    var __VLS_43 = __VLS_asFunctionalComponent(__VLS_42, new __VLS_42(__assign({ 'onChange': {} }, { modelValue: (scope_1.row.isHidden), activeValue: (true), inactiveValue: (false), activeColor: "#00b4b4" })));
    var __VLS_44 = __VLS_43.apply(void 0, __spreadArray([__assign({ 'onChange': {} }, { modelValue: (scope_1.row.isHidden), activeValue: (true), inactiveValue: (false), activeColor: "#00b4b4" })], __VLS_functionalComponentArgsRest(__VLS_43), false));
    var __VLS_46 = void 0;
    var __VLS_47 = void 0;
    var __VLS_48 = ({ change: {} },
        { onChange: function () {
                var _a = [];
                for (var _i = 0; _i < arguments.length; _i++) {
                    _a[_i] = arguments[_i];
                }
                var $event = _a[0];
                __VLS_ctx.handleHiddenChange(scope_1.row);
                // @ts-ignore
                [handleHiddenChange,];
            } });
    var __VLS_45;
}
var __VLS_39;
var __VLS_50 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
ElTableColumn;
// @ts-ignore
var __VLS_51 = __VLS_asFunctionalComponent(__VLS_50, new __VLS_50({
    label: "操作",
    width: "160",
}));
var __VLS_52 = __VLS_51.apply(void 0, __spreadArray([{
        label: "操作",
        width: "160",
    }], __VLS_functionalComponentArgsRest(__VLS_51), false));
var __VLS_54 = __VLS_53.slots.default;
{
    var __VLS_55 = __VLS_53.slots.default;
    var scope_2 = __VLS_getSlotParameters(__VLS_55)[0];
    var __VLS_56 = {}.ElButton;
    /** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
    // @ts-ignore
    ElButton;
    // @ts-ignore
    var __VLS_57 = __VLS_asFunctionalComponent(__VLS_56, new __VLS_56(__assign(__assign({ 'onClick': {} }, { type: "warning" }), { style: {} })));
    var __VLS_58 = __VLS_57.apply(void 0, __spreadArray([__assign(__assign({ 'onClick': {} }, { type: "warning" }), { style: {} })], __VLS_functionalComponentArgsRest(__VLS_57), false));
    var __VLS_60 = void 0;
    var __VLS_61 = void 0;
    var __VLS_62 = ({ click: {} },
        { onClick: function () {
                var _a = [];
                for (var _i = 0; _i < arguments.length; _i++) {
                    _a[_i] = arguments[_i];
                }
                var $event = _a[0];
                __VLS_ctx.openEditDialog(scope_2.row);
                // @ts-ignore
                [openEditDialog,];
            } });
    var __VLS_63 = __VLS_59.slots.default;
    var __VLS_59;
    var __VLS_64 = {}.ElButton;
    /** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
    // @ts-ignore
    ElButton;
    // @ts-ignore
    var __VLS_65 = __VLS_asFunctionalComponent(__VLS_64, new __VLS_64(__assign(__assign({ 'onClick': {} }, { type: "danger" }), { style: {} })));
    var __VLS_66 = __VLS_65.apply(void 0, __spreadArray([__assign(__assign({ 'onClick': {} }, { type: "danger" }), { style: {} })], __VLS_functionalComponentArgsRest(__VLS_65), false));
    var __VLS_68 = void 0;
    var __VLS_69 = void 0;
    var __VLS_70 = ({ click: {} },
        { onClick: function () {
                var _a = [];
                for (var _i = 0; _i < arguments.length; _i++) {
                    _a[_i] = arguments[_i];
                }
                var $event = _a[0];
                __VLS_ctx.handleDelete(scope_2.row);
                // @ts-ignore
                [handleDelete,];
            } });
    var __VLS_71 = __VLS_67.slots.default;
    var __VLS_67;
}
var __VLS_53;
var __VLS_19;
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)(__assign({ class: "pagination-area" }));
__VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)(__assign({ class: "total-info" }));
(__VLS_ctx.categoryList.length);
(__VLS_ctx.totalPages);
// @ts-ignore
[categoryList, totalPages,];
var __VLS_72 = {}.ElPagination;
/** @type {[typeof __VLS_components.ElPagination, typeof __VLS_components.elPagination, ]} */ ;
// @ts-ignore
ElPagination;
// @ts-ignore
var __VLS_73 = __VLS_asFunctionalComponent(__VLS_72, new __VLS_72(__assign(__assign({ 'onCurrentChange': {} }, { 'onSizeChange': {} }), { currentPage: (__VLS_ctx.currentPage), pageSizes: ([10, 20, 30]), pageSize: (__VLS_ctx.pageSize), layout: "prev, pager, next", total: (__VLS_ctx.categoryList.length) })));
var __VLS_74 = __VLS_73.apply(void 0, __spreadArray([__assign(__assign({ 'onCurrentChange': {} }, { 'onSizeChange': {} }), { currentPage: (__VLS_ctx.currentPage), pageSizes: ([10, 20, 30]), pageSize: (__VLS_ctx.pageSize), layout: "prev, pager, next", total: (__VLS_ctx.categoryList.length) })], __VLS_functionalComponentArgsRest(__VLS_73), false));
var __VLS_76;
var __VLS_77;
var __VLS_78 = ({ currentChange: {} },
    { onCurrentChange: (__VLS_ctx.handleCurrentChange) });
var __VLS_79 = ({ sizeChange: {} },
    { onSizeChange: (__VLS_ctx.handleSizeChange) });
// @ts-ignore
[categoryList, currentPage, pageSize, handleCurrentChange, handleSizeChange,];
var __VLS_75;
var __VLS_81 = {}.ElSelect;
/** @type {[typeof __VLS_components.ElSelect, typeof __VLS_components.elSelect, typeof __VLS_components.ElSelect, typeof __VLS_components.elSelect, ]} */ ;
// @ts-ignore
ElSelect;
// @ts-ignore
var __VLS_82 = __VLS_asFunctionalComponent(__VLS_81, new __VLS_81(__assign(__assign({ 'onChange': {} }, { modelValue: (__VLS_ctx.pageSize), placeholder: "条数/页" }), { style: {} })));
var __VLS_83 = __VLS_82.apply(void 0, __spreadArray([__assign(__assign({ 'onChange': {} }, { modelValue: (__VLS_ctx.pageSize), placeholder: "条数/页" }), { style: {} })], __VLS_functionalComponentArgsRest(__VLS_82), false));
var __VLS_85;
var __VLS_86;
var __VLS_87 = ({ change: {} },
    { onChange: (__VLS_ctx.handleSizeChange) });
var __VLS_88 = __VLS_84.slots.default;
// @ts-ignore
[pageSize, handleSizeChange,];
var __VLS_89 = {}.ElOption;
/** @type {[typeof __VLS_components.ElOption, typeof __VLS_components.elOption, ]} */ ;
// @ts-ignore
ElOption;
// @ts-ignore
var __VLS_90 = __VLS_asFunctionalComponent(__VLS_89, new __VLS_89({
    label: "10条/页",
    value: "10",
}));
var __VLS_91 = __VLS_90.apply(void 0, __spreadArray([{
        label: "10条/页",
        value: "10",
    }], __VLS_functionalComponentArgsRest(__VLS_90), false));
var __VLS_94 = {}.ElOption;
/** @type {[typeof __VLS_components.ElOption, typeof __VLS_components.elOption, ]} */ ;
// @ts-ignore
ElOption;
// @ts-ignore
var __VLS_95 = __VLS_asFunctionalComponent(__VLS_94, new __VLS_94({
    label: "20条/页",
    value: "20",
}));
var __VLS_96 = __VLS_95.apply(void 0, __spreadArray([{
        label: "20条/页",
        value: "20",
    }], __VLS_functionalComponentArgsRest(__VLS_95), false));
var __VLS_99 = {}.ElOption;
/** @type {[typeof __VLS_components.ElOption, typeof __VLS_components.elOption, ]} */ ;
// @ts-ignore
ElOption;
// @ts-ignore
var __VLS_100 = __VLS_asFunctionalComponent(__VLS_99, new __VLS_99({
    label: "30条/页",
    value: "30",
}));
var __VLS_101 = __VLS_100.apply(void 0, __spreadArray([{
        label: "30条/页",
        value: "30",
    }], __VLS_functionalComponentArgsRest(__VLS_100), false));
var __VLS_84;
__VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({});
var __VLS_104 = {}.ElInput;
/** @type {[typeof __VLS_components.ElInput, typeof __VLS_components.elInput, ]} */ ;
// @ts-ignore
ElInput;
// @ts-ignore
var __VLS_105 = __VLS_asFunctionalComponent(__VLS_104, new __VLS_104(__assign(__assign(__assign({ 'onKeyup': {} }, { modelValue: (__VLS_ctx.jumpPage), type: "number" }), { style: {} }), { min: (1), max: (__VLS_ctx.totalPages) })));
var __VLS_106 = __VLS_105.apply(void 0, __spreadArray([__assign(__assign(__assign({ 'onKeyup': {} }, { modelValue: (__VLS_ctx.jumpPage), type: "number" }), { style: {} }), { min: (1), max: (__VLS_ctx.totalPages) })], __VLS_functionalComponentArgsRest(__VLS_105), false));
var __VLS_108;
var __VLS_109;
var __VLS_110 = ({ keyup: {} },
    { onKeyup: (__VLS_ctx.handleJump) });
// @ts-ignore
[totalPages, jumpPage, handleJump,];
var __VLS_107;
var __VLS_112 = {}.ElButton;
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
// @ts-ignore
ElButton;
// @ts-ignore
var __VLS_113 = __VLS_asFunctionalComponent(__VLS_112, new __VLS_112(__assign(__assign({ 'onClick': {} }, { type: "primary" }), { style: {} })));
var __VLS_114 = __VLS_113.apply(void 0, __spreadArray([__assign(__assign({ 'onClick': {} }, { type: "primary" }), { style: {} })], __VLS_functionalComponentArgsRest(__VLS_113), false));
var __VLS_116;
var __VLS_117;
var __VLS_118 = ({ click: {} },
    { onClick: (__VLS_ctx.handleJump) });
var __VLS_119 = __VLS_115.slots.default;
// @ts-ignore
[handleJump,];
var __VLS_115;
var __VLS_120 = {}.ElDialog;
/** @type {[typeof __VLS_components.ElDialog, typeof __VLS_components.elDialog, typeof __VLS_components.ElDialog, typeof __VLS_components.elDialog, ]} */ ;
// @ts-ignore
ElDialog;
// @ts-ignore
var __VLS_121 = __VLS_asFunctionalComponent(__VLS_120, new __VLS_120({
    modelValue: (__VLS_ctx.dialogVisible),
    title: (__VLS_ctx.isEdit ? '编辑产品分类' : '新增产品分类'),
    width: "400px",
    closeOnClickModal: (false),
}));
var __VLS_122 = __VLS_121.apply(void 0, __spreadArray([{
        modelValue: (__VLS_ctx.dialogVisible),
        title: (__VLS_ctx.isEdit ? '编辑产品分类' : '新增产品分类'),
        width: "400px",
        closeOnClickModal: (false),
    }], __VLS_functionalComponentArgsRest(__VLS_121), false));
var __VLS_124 = __VLS_123.slots.default;
// @ts-ignore
[dialogVisible, isEdit,];
var __VLS_125 = {}.ElForm;
/** @type {[typeof __VLS_components.ElForm, typeof __VLS_components.elForm, typeof __VLS_components.ElForm, typeof __VLS_components.elForm, ]} */ ;
// @ts-ignore
ElForm;
// @ts-ignore
var __VLS_126 = __VLS_asFunctionalComponent(__VLS_125, new __VLS_125({
    ref: "formRef",
    model: (__VLS_ctx.form),
    labelWidth: "100px",
    rules: (__VLS_ctx.formRules),
}));
var __VLS_127 = __VLS_126.apply(void 0, __spreadArray([{
        ref: "formRef",
        model: (__VLS_ctx.form),
        labelWidth: "100px",
        rules: (__VLS_ctx.formRules),
    }], __VLS_functionalComponentArgsRest(__VLS_126), false));
/** @type {typeof __VLS_ctx.formRef} */ ;
var __VLS_129 = {};
var __VLS_131 = __VLS_128.slots.default;
// @ts-ignore
[form, formRules, formRef,];
var __VLS_132 = {}.ElFormItem;
/** @type {[typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, ]} */ ;
// @ts-ignore
ElFormItem;
// @ts-ignore
var __VLS_133 = __VLS_asFunctionalComponent(__VLS_132, new __VLS_132({
    label: "分类名称",
    prop: "name",
}));
var __VLS_134 = __VLS_133.apply(void 0, __spreadArray([{
        label: "分类名称",
        prop: "name",
    }], __VLS_functionalComponentArgsRest(__VLS_133), false));
var __VLS_136 = __VLS_135.slots.default;
var __VLS_137 = {}.ElInput;
/** @type {[typeof __VLS_components.ElInput, typeof __VLS_components.elInput, ]} */ ;
// @ts-ignore
ElInput;
// @ts-ignore
var __VLS_138 = __VLS_asFunctionalComponent(__VLS_137, new __VLS_137({
    modelValue: (__VLS_ctx.form.name),
    placeholder: "请输入分类名称",
}));
var __VLS_139 = __VLS_138.apply(void 0, __spreadArray([{
        modelValue: (__VLS_ctx.form.name),
        placeholder: "请输入分类名称",
    }], __VLS_functionalComponentArgsRest(__VLS_138), false));
// @ts-ignore
[form,];
var __VLS_135;
var __VLS_142 = {}.ElFormItem;
/** @type {[typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, ]} */ ;
// @ts-ignore
ElFormItem;
// @ts-ignore
var __VLS_143 = __VLS_asFunctionalComponent(__VLS_142, new __VLS_142({
    label: "归属品牌",
    prop: "brand",
}));
var __VLS_144 = __VLS_143.apply(void 0, __spreadArray([{
        label: "归属品牌",
        prop: "brand",
    }], __VLS_functionalComponentArgsRest(__VLS_143), false));
var __VLS_146 = __VLS_145.slots.default;
var __VLS_147 = {}.ElSelect;
/** @type {[typeof __VLS_components.ElSelect, typeof __VLS_components.elSelect, typeof __VLS_components.ElSelect, typeof __VLS_components.elSelect, ]} */ ;
// @ts-ignore
ElSelect;
// @ts-ignore
var __VLS_148 = __VLS_asFunctionalComponent(__VLS_147, new __VLS_147({
    modelValue: (__VLS_ctx.form.brand),
    placeholder: "请选择归属品牌",
}));
var __VLS_149 = __VLS_148.apply(void 0, __spreadArray([{
        modelValue: (__VLS_ctx.form.brand),
        placeholder: "请选择归属品牌",
    }], __VLS_functionalComponentArgsRest(__VLS_148), false));
var __VLS_151 = __VLS_150.slots.default;
// @ts-ignore
[form,];
var __VLS_152 = {}.ElOption;
/** @type {[typeof __VLS_components.ElOption, typeof __VLS_components.elOption, ]} */ ;
// @ts-ignore
ElOption;
// @ts-ignore
var __VLS_153 = __VLS_asFunctionalComponent(__VLS_152, new __VLS_152({
    label: "品牌A",
    value: "品牌A",
}));
var __VLS_154 = __VLS_153.apply(void 0, __spreadArray([{
        label: "品牌A",
        value: "品牌A",
    }], __VLS_functionalComponentArgsRest(__VLS_153), false));
var __VLS_157 = {}.ElOption;
/** @type {[typeof __VLS_components.ElOption, typeof __VLS_components.elOption, ]} */ ;
// @ts-ignore
ElOption;
// @ts-ignore
var __VLS_158 = __VLS_asFunctionalComponent(__VLS_157, new __VLS_157({
    label: "品牌B",
    value: "品牌B",
}));
var __VLS_159 = __VLS_158.apply(void 0, __spreadArray([{
        label: "品牌B",
        value: "品牌B",
    }], __VLS_functionalComponentArgsRest(__VLS_158), false));
var __VLS_162 = {}.ElOption;
/** @type {[typeof __VLS_components.ElOption, typeof __VLS_components.elOption, ]} */ ;
// @ts-ignore
ElOption;
// @ts-ignore
var __VLS_163 = __VLS_asFunctionalComponent(__VLS_162, new __VLS_162({
    label: "品牌C",
    value: "品牌C",
}));
var __VLS_164 = __VLS_163.apply(void 0, __spreadArray([{
        label: "品牌C",
        value: "品牌C",
    }], __VLS_functionalComponentArgsRest(__VLS_163), false));
var __VLS_150;
var __VLS_145;
var __VLS_167 = {}.ElFormItem;
/** @type {[typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, ]} */ ;
// @ts-ignore
ElFormItem;
// @ts-ignore
var __VLS_168 = __VLS_asFunctionalComponent(__VLS_167, new __VLS_167({
    label: "是否隐藏",
}));
var __VLS_169 = __VLS_168.apply(void 0, __spreadArray([{
        label: "是否隐藏",
    }], __VLS_functionalComponentArgsRest(__VLS_168), false));
var __VLS_171 = __VLS_170.slots.default;
var __VLS_172 = {}.ElSwitch;
/** @type {[typeof __VLS_components.ElSwitch, typeof __VLS_components.elSwitch, ]} */ ;
// @ts-ignore
ElSwitch;
// @ts-ignore
var __VLS_173 = __VLS_asFunctionalComponent(__VLS_172, new __VLS_172({
    modelValue: (__VLS_ctx.form.isHidden),
    activeValue: (true),
    inactiveValue: (false),
    activeColor: "#00b4b4",
}));
var __VLS_174 = __VLS_173.apply(void 0, __spreadArray([{
        modelValue: (__VLS_ctx.form.isHidden),
        activeValue: (true),
        inactiveValue: (false),
        activeColor: "#00b4b4",
    }], __VLS_functionalComponentArgsRest(__VLS_173), false));
// @ts-ignore
[form,];
var __VLS_170;
var __VLS_128;
{
    var __VLS_177 = __VLS_123.slots.footer;
    __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)(__assign({ class: "dialog-footer" }));
    var __VLS_178 = {}.ElButton;
    /** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
    // @ts-ignore
    ElButton;
    // @ts-ignore
    var __VLS_179 = __VLS_asFunctionalComponent(__VLS_178, new __VLS_178(__assign({ 'onClick': {} })));
    var __VLS_180 = __VLS_179.apply(void 0, __spreadArray([__assign({ 'onClick': {} })], __VLS_functionalComponentArgsRest(__VLS_179), false));
    var __VLS_182 = void 0;
    var __VLS_183 = void 0;
    var __VLS_184 = ({ click: {} },
        { onClick: function () {
                var _a = [];
                for (var _i = 0; _i < arguments.length; _i++) {
                    _a[_i] = arguments[_i];
                }
                var $event = _a[0];
                __VLS_ctx.dialogVisible = false;
                // @ts-ignore
                [dialogVisible,];
            } });
    var __VLS_185 = __VLS_181.slots.default;
    var __VLS_181;
    var __VLS_186 = {}.ElButton;
    /** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
    // @ts-ignore
    ElButton;
    // @ts-ignore
    var __VLS_187 = __VLS_asFunctionalComponent(__VLS_186, new __VLS_186(__assign({ 'onClick': {} }, { type: "primary" })));
    var __VLS_188 = __VLS_187.apply(void 0, __spreadArray([__assign({ 'onClick': {} }, { type: "primary" })], __VLS_functionalComponentArgsRest(__VLS_187), false));
    var __VLS_190 = void 0;
    var __VLS_191 = void 0;
    var __VLS_192 = ({ click: {} },
        { onClick: (__VLS_ctx.submitForm) });
    var __VLS_193 = __VLS_189.slots.default;
    // @ts-ignore
    [submitForm,];
    var __VLS_189;
}
var __VLS_123;
/** @type {__VLS_StyleScopedClasses['product-category-page']} */ ;
/** @type {__VLS_StyleScopedClasses['page-header']} */ ;
/** @type {__VLS_StyleScopedClasses['page-title']} */ ;
/** @type {__VLS_StyleScopedClasses['return-btn']} */ ;
/** @type {__VLS_StyleScopedClasses['action-area']} */ ;
/** @type {__VLS_StyleScopedClasses['add-btn']} */ ;
/** @type {__VLS_StyleScopedClasses['pagination-area']} */ ;
/** @type {__VLS_StyleScopedClasses['total-info']} */ ;
/** @type {__VLS_StyleScopedClasses['dialog-footer']} */ ;
// @ts-ignore
var __VLS_130 = __VLS_129;
var __VLS_export = (await Promise.resolve().then(function () { return require('vue'); })).defineComponent({});
exports.default = {};
